/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/idenger">idenger</a> All rights reserved.
 */
package com.idenger.modules.edu.entity.order;

import java.util.Date;
import java.util.List;

import com.idenger.common.persistence.DataEntity;
import com.idenger.common.utils.excel.annotation.ExcelField;
import com.idenger.modules.edu.entity.enroll.EduEnroll;
import com.idenger.modules.edu.entity.enrolldetails.EduEnrollDetails;
import com.idenger.modules.edu.entity.project.EduProject;
import org.hibernate.validator.constraints.Length;

/**
 * 订单Entity
 * @author 兰正军
 * @version 2017-12-12
 */
public class EduOrder extends DataEntity<EduOrder> {
	
	private static final long serialVersionUID = 1L;
	private String userid;		// userid
	private String tradeNo;		// 订单唯一标识
	private String payMethod;		// 支付方式
	private String payStatus;		// 支付状态
	private String price;		// 实际支付价格
	private String orderStatus;		// 订单状态
	//订单邮寄信息
	private String invoiceStatus;		// 是否开具发票
	private String invoiceType;		// 抬头类型
	private String invoiceCompanyName;		// 抬头名称
	private String dutyParagraph;		// 税号
	private Date createDate;	//创建时间
	private String orderName;
	
	
	//订单下的课程列表
	private List<EduEnroll> courseList;
	
	//订单额外信息
	private EduEnrollDetails details;
	
	//订单关联用户的信息
	private String nickName;//昵称
	private String realName;//真是姓名
	private String phone;	//手机号
	private String email;//邮箱
	private String idCard;//身份证号
	private Date startDate;
	private Date endDate;
	
	
	private EduOrderDetails eduOrderDetails;
	
	private List<EduProject> projectList;
	
	
	
	public EduOrder() {
		super();
	}

	public EduOrder(String id){
		super(id);
	}

	@Length(min=0, max=64, message="userid长度必须介于 0 和 64 之间")
	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}
	
    @ExcelField(title="订单编号", align=2, sort=10)
	@Length(min=0, max=64, message="订单唯一标识长度必须介于 0 和 64 之间")
	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}
	
    @ExcelField(title="支付方式", align=2, sort=70)  
	@Length(min=0, max=64, message="支付方式长度必须介于 0 和 64 之间")
	public String getPayMethod() {
		return payMethod;
	}

	public void setPayMethod(String payMethod) {
		this.payMethod = payMethod;
	}
	
	@Length(min=0, max=10, message="支付状态长度必须介于 0 和 10 之间")
	public String getPayStatus() {
		return payStatus;
	}
	
    @ExcelField(title="支付状态", align=2, sort=80)  
    public String getPayStatusDict(){
    	if("1".equals(payStatus)){
    		return "已支付";
    	}
    	return "未支付";
    }

	public void setPayStatus(String payStatus) {
		this.payStatus = payStatus;
	}
	
    @ExcelField(title="支付金额", align=2, sort=90)  
	@Length(min=0, max=64, message="实际支付价格长度必须介于 0 和 64 之间")
	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}
	
	@Length(min=0, max=10, message="订单状态长度必须介于 0 和 10 之间")
	public String getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(String orderStatus) {
		this.orderStatus = orderStatus;
	}
	@ExcelField(title="是否需要发票", align=2, sort=110) 
	@Length(min=0, max=64, message="是否开具发票长度必须介于 0 和 64 之间")
	public String getInvoiceStatus() {
		return invoiceStatus;
	}

	public void setInvoiceStatus(String invoiceStatus) {
		this.invoiceStatus = invoiceStatus;
	}
	
	@ExcelField(title="抬头类型", align=2, sort=120) 
	@Length(min=0, max=512, message="抬头类型长度必须介于 0 和 512 之间")
	public String getInvoiceType() {
		return invoiceType;
	}

	public void setInvoiceType(String invoiceType) {
		this.invoiceType = invoiceType;
	}
	
	@ExcelField(title="发票抬头", align=2, sort=130) 
	@Length(min=0, max=512, message="抬头名称长度必须介于 0 和 512 之间")
	public String getInvoiceCompanyName() {
		return invoiceCompanyName;
	}

	public void setInvoiceCompanyName(String invoiceCompanyName) {
		this.invoiceCompanyName = invoiceCompanyName;
	}
	
	@ExcelField(title="税号", align=2, sort=140) 
	@Length(min=0, max=64, message="税号长度必须介于 0 和 64 之间")
	public String getDutyParagraph() {
		return dutyParagraph;
	}

	public void setDutyParagraph(String dutyParagraph) {
		this.dutyParagraph = dutyParagraph;
	}


	public EduEnrollDetails getDetails() {
		return details;
	}

	public void setDetails(EduEnrollDetails details) {
		this.details = details;
	}

	public List<EduEnroll> getList() {
		return courseList;
	}

	public void setList(List<EduEnroll> list) {
		this.courseList = list;
	}

    @ExcelField(title="用户名", align=2, sort=20)  
	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
    @ExcelField(title="真实姓名", align=2, sort=30)  
	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}
	
    @ExcelField(title="手机号", align=2, sort=40)  
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	
    @ExcelField(title="邮箱", align=2, sort=50)  
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	
    @ExcelField(title="身份证号", align=2, sort=60)  
	public String getIdCard() {
		return idCard;
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@ExcelField(title="购买时间", align=2, sort=100) 
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public List<EduEnroll> getCourseList() {
		return courseList;
	}

	public void setCourseList(List<EduEnroll> courseList) {
		this.courseList = courseList;
	}

	public EduOrderDetails getEduOrderDetails() {
		return eduOrderDetails;
	}

	public void setEduOrderDetails(EduOrderDetails eduOrderDetails) {
		this.eduOrderDetails = eduOrderDetails;
	}

	public List<EduProject> getProjectList() {
		return projectList;
	}

	public void setProjectList(List<EduProject> projectList) {
		this.projectList = projectList;
	}

	public String getOrderName() {
		return orderName;
	}

	public void setOrderName(String orderName) {
		this.orderName = orderName;
	}

	
	
	
	
}